package com.jet.office.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jet.core.utils.IdUtil;
import com.jet.office.domain.entity.MerchantIndustryLog;
import com.jet.office.mapper.MerchantIndustryLogMapper;
import com.jet.office.service.IMerchantIndustryLogService;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2025-02-14
 */
@Service
public class MerchantIndustryLogServiceImpl extends ServiceImpl<MerchantIndustryLogMapper, MerchantIndustryLog> implements IMerchantIndustryLogService {

    @Override
    public void save(long merchantNo, String orderNo, String industryId, int industryType, long addMonth) {
        MerchantIndustryLog entity = new MerchantIndustryLog();
        entity.setId(IdUtil.generateLower());
        entity.setMerchantNo(merchantNo);
        entity.setIndustryId(industryId);
        entity.setAddMonth(addMonth);
        entity.setType(industryType);
        entity.setOrderNo(orderNo);
        entity.setCreateTime(LocalDateTime.now());
        super.save(entity);
    }
}
